<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>02_子项目排列方式</title>
    <style>
        .container{
            background-color: lightgreen;
            /*给父容器使用弹性布局*/
            display:flex;
            /*子项目排列方式*/
            justify-content: flex-start;/*主轴起点对齐*/
            justify-content: flex-end;/*主轴终点对齐*/
            justify-content: space-between;/*主轴两端对齐：首尾元素贴边，其余空间均分*/
            justify-content: center;/*主轴居中对齐*/
            justify-content: space-around;/*主轴环绕对齐：环绕着元素的距离都是啊，两个元素之间的距离是2a*/
            justify-content: space-evenly;/*主轴公平对齐：所有间隙都相等*/

            height: 500px;
            align-items: flex-start;/*交叉轴起点对齐*/
            align-items: flex-end;/*交叉轴终点对齐*/
            align-items: center;/*交叉轴居中对齐*/
        }
        .item{
            width: 100px;
            height: 100px;
            background-color: lightpink;
            border: 1px solid black;
            font-size: 45px;
        }
    </style>
</head>
<body>
<div class="container">
    <div class="item">1</div>
    <div class="item">2</div>
    <div class="item">3</div>
    <div class="item">4</div>
    <div class="item">5</div>
    <div class="item">6</div>
    <div class="item">7</div>
    <div class="item">8</div>
</div>
</body>
</html>